package com.oj.judge.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.oj.common.annotation.Excel;
import com.oj.common.core.domain.BaseEntity;

/**
 * 测评状态对象 oj_submission
 * 
 * @author xxx
 * @date 2025-03-16
 */
public class OjSubmission extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 提交记录ID */
    @Excel(name = "提交记录ID")
    private Long id;

    /** 题目ID */
    @Excel(name = "题目ID")
    private Long problemId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 编程语言 */
    @Excel(name = "编程语言")
    private String language;

    /** 用户提交的代码 */
    private String code;

    /** 判题状态 */
    @Excel(name = "判题状态")
    private String status;

    /** 总执行时间(ms) */
    @Excel(name = "总执行时间(ms)")
    private Long time;

    /** 最大内存使用量(KB) */
    @Excel(name = "最大内存使用量(KB)")
    private Long memory;

    /** 所有测试用例的结果(JSON存储) */
    private String testCaseResults;

    /** 错误信息（如编译错误或运行时错误） */
    @Excel(name = "错误信息", readConverterExp = "如=编译错误或运行时错误")
    private String errorMessage;

    /** 附加信息 */
    @Excel(name = "附加信息")
    private String message;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setProblemId(Long problemId) 
    {
        this.problemId = problemId;
    }

    public Long getProblemId() 
    {
        return problemId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setLanguage(String language) 
    {
        this.language = language;
    }

    public String getLanguage() 
    {
        return language;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setTime(Long time) 
    {
        this.time = time;
    }

    public Long getTime() 
    {
        return time;
    }
    public void setMemory(Long memory) 
    {
        this.memory = memory;
    }

    public Long getMemory() 
    {
        return memory;
    }
    public void setTestCaseResults(String testCaseResults) 
    {
        this.testCaseResults = testCaseResults;
    }

    public String getTestCaseResults() 
    {
        return testCaseResults;
    }
    public void setErrorMessage(String errorMessage) 
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() 
    {
        return errorMessage;
    }
    public void setmessage(String message) 
    {
        this.message = message;
    }

    public String getMessage()
    {
        return message;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("problemId", getProblemId())
            .append("userId", getUserId())
            .append("language", getLanguage())
            .append("code", getCode())
            .append("status", getStatus())
            .append("time", getTime())
            .append("memory", getMemory())
            .append("testCaseResults", getTestCaseResults())
            .append("errorMessage", getErrorMessage())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("message", getMessage())
            .toString();
    }
}
